package com.ruoyi.backend.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class UavUploadDTO {

    public interface Upload {
    }

    private MultipartFile file;

    private String uavId;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(groups = {Upload.class}, message = "时间不能为空")
    private LocalDate uavTime;

    @NotNull(groups = {Upload.class}, message = "矿场ID不能为空")
    private String mineId;

    @NotNull(groups = {Upload.class}, message = "无人机影像文件名称不能为空")
    private String uavName;

    @NotNull(groups = {Upload.class}, message = "影像坐标边界不能为空")
    private String spatialCoverage;

    @NotNull(groups = {Upload.class}, message = "数据类型不能为空")
    private String dataType;

    @NotNull(groups = {Upload.class}, message = "保存方式不能为空")
    private String saveType;

    private String minioBucketName;

    private String minioFileName;

    @NotNull(groups = {Upload.class}, message = "EPSG编码不能为空")
    private Integer epsgCode;

    private String md5;

}
